package team.szm.scd.database.properties;

import com.baomidou.mybatisplus.annotation.IEnum;

import java.time.LocalTime;

public enum AppointmentTimeType implements IEnum<Integer> {
    MORNING1(1, LocalTime.of(8, 0), LocalTime.of(10, 0)),
    MORNING2(2, LocalTime.of(10, 0), LocalTime.of(12, 0)),
    AFTERNOON1(3, LocalTime.of(13, 0), LocalTime.of(15, 0)),
    AFTERNOON2(4, LocalTime.of(15, 0), LocalTime.of(17, 0)),
    ;

    final int value;
    final LocalTime startTime, endTime;

    public LocalTime getStartTime() {
        return startTime;
    }

    public LocalTime getEndTime() {
        return endTime;
    }

    AppointmentTimeType(int value, LocalTime startTime, LocalTime endTime) {
        this.value = value;
        this.startTime = startTime;
        this.endTime = endTime;
    }

    @Override
    public Integer getValue() {
        return value;
    }
}
